package cn.ddiancan.auth.context;

import cn.ddiancan.xddcloud.common.entity.UserVO;

public class AuthContext {

    public static ThreadLocal<UserVO> authUserThreadLocal = new ThreadLocal<>();

    public static UserVO getAuthUser() {
        return authUserThreadLocal.get();
    }

    public static void setAuthUser(UserVO user) {
        authUserThreadLocal.set(user);
    }

    public static void clearAuthUser() {
        authUserThreadLocal.remove();
    }
}
